import http from "@/http";
//新增参数类型
export type Room = {
    roomId: string;
    roomName: string;
    image: string;
    categoryId: string;
    floorId: string;
    numX: string;
    numY: string;
    area: string;
    orderNum: string;
    beginTime: string;
    endTime: string;
}
//列表参数类型
export type ListParm = {
    currentPage:number;
    pageSize:number;
    categoryId:string;
    roomName:string;
}
//新增
export const addApi = (parm:Room) => {
    return http.post("/api/room",parm)
}
//列表
export const getListApi = (parm:ListParm)=>{
    return http.get("/api/room/list",parm)
}
//编辑
export const editApi = (parm:Room)=>{
    return http.put("/api/room",parm)
}
//删除
export const deleteApi = (roomId:string)=>{
    return http.delete(`/api/room/${roomId}`)
}